<template>
	<view class="historyBox">
		<view @click="toDetail(item)" v-for="(item,index) in historyList" :key="index" class="longItem">
			<view v-if="index == 0" class="label">最近观看</view>
			<view class="itemBox">
				<image class="itemLeft" style="width: 90rpx;height: 100%;" :src="item.coverImgUrl"></image>
				<view class="itemRight">
					<view style="color:#333333;font-size: 30rpx;margin-bottom: 4rpx;width: 236rpx;">
						<text style="width: 100%;display: inline-block;" class="clamp" >{{item.title}}</text>
					</view>
					<view style="font-size: 24rpx;color: #B3B3B3;">看到第{{item.alreadyWatchSequence + 1}}集 共{{item.updateOfEpisodes}}集</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'navTab',
		props: {
			historyList:{
				type:Array,
				default:()=>{
					return [];
				}
			}

		},
		data() {
			return {
				isKs:true
			};
		},
		mounted() {
			// #ifdef MP-KUAISHOU
				this.isKs = true;
			// #endif
			//#ifdef MP-TOUTIAO
				this.isKs = false;
			//#endif
		},
		methods: {
			toDetail(item) {
				this.zwyRouter(`../video/video?fakeId=${item.fakeId}&compilationId=${item.compilationId}`);
			}
		}
	}
</script>

<style scoped lang="scss">
	.longItem{
		position: relative;
	}
	
	.historyBoxTT{
		display: flex;
		width: 100vw;
		height: 213rpx;
		overflow-x: scroll;
		align-items: center;
		justify-content: flex-start;
	}
	.historyBox{
		padding-left: 4.5vw;
		display: flex;
		width: 100vw;
		height: 213rpx;
		overflow-x: scroll;
		align-items: center;
		justify-content: flex-start;
	}
	.clamp {
		display: -webkit-box;
		word-break: break-all;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		 white-space:nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.label{
		width: 117rpx;
		height: 33rpx;
		background: #FFF3F6;
		border-radius: 9rpx;
		position: absolute;
		right: 0;
		top: 0;
		text-align: center;
		font-size: 22rpx;
		color: #F66E8E;
	}
	.itemBox{
		.itemLeft{
			border-radius: 15rpx;
			margin-right: 17rpx;
		}
		.itemRight{
			display: flex;
			width: 236rpx;
			align-items: flex-start;
			justify-content: center;
			flex-direction: column;
		}
		display: flex;
		box-sizing: border-box;
		border-radius: 15rpx;
		width: 354rpx;
		margin-left: 24rpx;
		height: 140rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 19rpx 3rpx rgba(0, 0, 0, 0.06);
		border-radius: 15rpx;
		// border: 1rpx solid #E8E8E8;
		
	}
	
	::-webkit-scrollbar {
	  width: 0 !important;
	  height: 0 !important;
	  opacity: 0 !important;
	  display: none;
	  color: transparent;
	}
	.longHover{
		opacity: .8;
		transition: .3s;
	}

	.navTabBox {
		width: 100vw;
		height: 213rpx;
		color: rgba(255, 255, 255, 0.50);
		.click {
			color: #FF6E17 !important;
			// background-color: #FF6E17 !important;
		}
		.longTab {
			height: 213rpx;
			width: 95vw;
			margin: auto;
			.longItem{
				position: relative;
				display: inline-block;
			}
			.underlineBox {
				height: 3px;
				width: 0;
				display: flex;
				align-content: center;
				justify-content: center;
				transition: .3s;
				.underline {
					width: 0;
					height: 0;
					background-color: white;
				}
			}
		}
	}
</style>
